home *** CD-ROM | disk | FTP | other *** search
/ Freelog 121 / FreelogMagazineJuilletAout2014-No121.iso / Outils / Adobe-Air / adobe-air_13.exe / [0] / setup.swf / scripts / skins / SimpleScrollTrackSkin.as < prev    next >
Text File  |  2014-03-27  |  1KB  |  44 lines

  1. package skins
  2. {
  3.    import flash.display.GradientType;
  4.    import mx.skins.Border;
  5.    import mx.styles.StyleManager;
  6.    
  7.    public class SimpleScrollTrackSkin extends Border
  8.    {
  9.        
  10.       
  11.       public function SimpleScrollTrackSkin()
  12.       {
  13.          super();
  14.       }
  15.       
  16.       override public function get measuredWidth() : Number
  17.       {
  18.          return 16;
  19.       }
  20.       
  21.       override public function get measuredHeight() : Number
  22.       {
  23.          return 1;
  24.       }
  25.       
  26.       override protected function updateDisplayList(param1:Number, param2:Number) : void
  27.       {
  28.          super.updateDisplayList(param1,param2);
  29.          var _loc3_:Array = getStyle("trackColors");
  30.          StyleManager.getColorNames(_loc3_);
  31.          var _loc4_:uint = getStyle("borderColor");
  32.          graphics.clear();
  33.          drawRoundRect(0,0,param1,param2,0,_loc4_,1,verticalGradientMatrix(0,0,param1,param2),GradientType.LINEAR,null,{
  34.             "x":1,
  35.             "y":1,
  36.             "w":param1 - 2,
  37.             "h":param2 - 2,
  38.             "r":0
  39.          });
  40.          drawRoundRect(1,0,param1 - 1,param2,0,_loc3_,1,horizontalGradientMatrix(1,1,param1 / 3 * 2,param2 - 2));
  41.       }
  42.    }
  43. }
  44.